@(contact: Contact)

@main(Html("Contact created!"), nav = "contact") {
    
    <h2>@contact.firstname @contact.lastname</h2>
    
    <h6>Company</h6>
    
    <p>
        @contact.company.getOrElse { <em>Not specified</em> } 
    </p>
    
    @contact.informations.map { information =>
        
        <h3>@information.label:</h3>
        
        <h6>Email</h6>

        <p>
            @information.email.getOrElse { <em>Not specified</em> } 
        </p>
        
        @if(information.phones.size > 0) {
            
            <h6>Phones</h6>
            
            <ul>
                @information.phones.map { phone =>
                    <li>@phone</li>
                }
            </ul>
            
        }
        
    }
    
}